package com.yootk;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class YootkDemo10 {
    public static void main(String[] args) throws Exception {
        Map<String, String> map = new ConcurrentHashMap<String, String>();

        for (int num = 0; num < 10; num++) {
            new Thread(() -> {
                for (int x = 0; x < 10; x++) {
                    map.put("[" + Thread.currentThread().getName() + "] x=" + x, "www.yootk.com");
                    System.out.println(map);
                }
            }, "Map集合操作线程-" + num).start();
        }
    }
}